import storage from '@/libs/storage'
const isZh = storage.getLocal('language') == 'zh';

const Country = {
    data: [
        {
            code: 'PH',
            name: 'Philippines',
            cnName: '菲律宾',
        },
        {
            code: 'ID',
            name: 'Indonesia',
            cnName: '印度尼西亚',
        }
    ],
    switchData(val) {
        let type = '';
        val = val + '';
        if (val) {
            Country.data.forEach(item => {
                if (item.code === val) {
                    type = isZh ? item.cnName : item.name;
                }
            });
        }
        return type;
    },
};

export default Country
